/*==============================================================================

  Program: 3D Slicer

  Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.

  See COPYRIGHT.txt
  or http://www.slicer.org/copyright/copyright.txt for details.

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

==============================================================================*/

#ifndef __qSlicerbaptransformModuleWidget_h
#define __qSlicerbaptransformModuleWidget_h

// Slicer includes
#include <QFile>
#include "qSlicerAbstractModuleWidget.h"

#include "qSlicerbaptransformModuleExport.h"

class qSlicerbaptransformModuleWidgetPrivate;
class vtkMRMLNode;
class vtkImageData;
class vtkMRMLTransformNode;
/// \ingroup Slicer_QtModules_ExtensionTemplate
class Q_SLICER_QTMODULES_BAPTRANSFORM_EXPORT qSlicerbaptransformModuleWidget :
  public qSlicerAbstractModuleWidget
{
  Q_OBJECT

public:

  typedef qSlicerAbstractModuleWidget Superclass;
  qSlicerbaptransformModuleWidget(QWidget *parent=0);
  virtual ~qSlicerbaptransformModuleWidget();

public slots:
void updateVolumeNodeFromGUI(vtkMRMLNode*);
void updateTransformNodeFromGUI(vtkMRMLNode*);
void updatePointSetNodeFromGUI(vtkMRMLNode*);
void apply(bool);
void selectFile(bool);
void process(QString file, std::string genestring, vtkMRMLTransformNode* transform, vtkImageData* imageData,int zslice);
protected:
  QScopedPointer<qSlicerbaptransformModuleWidgetPrivate> d_ptr;
  QStringList GetFileList(QString dir);

  virtual void setup();
  void updateApplyButton();
private:
  Q_DECLARE_PRIVATE(qSlicerbaptransformModuleWidget);
  Q_DISABLE_COPY(qSlicerbaptransformModuleWidget);
};

#endif
